//
//  YYSOpenVipController.m
//  FanLaiWu
//
//  Created by gonglei on 17/3/17.
//  Copyright © 2017年 yys. All rights reserved.
//

#import "YYSOpenVipController.h"
#import "FZHPopView.h"
@interface YYSOpenVipController ()<FZHPopViewDelegate>{
    FZHPopView *_fzhPopView;
}
@property (weak, nonatomic) IBOutlet UIImageView *iconImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIButton *oneBtn;
@property (weak, nonatomic) IBOutlet UIButton *twoBtn;
@property (weak, nonatomic) IBOutlet UIButton *threeBtn;

@end

@implementation YYSOpenVipController
- (IBAction)clickkaitongBtn:(UIButton *)sender {
    if (sender.tag == 10) {//一个月
        
    } else if (sender.tag == 20) {//三个月
        
    } else {//一年
        
    }
    _fzhPopView = [[FZHPopView alloc]initWithFrame:CGRectMake(0, 0, YYSScreenW, YYSScreenH)];
    _fzhPopView.fzhPopViewDelegate = self;
    [_fzhPopView showThePopViewWithArray:nil];
}
#pragma mark - FZHPopViewDelegate
- (void)getTheButtonTitleWithView:(UIView *)view{
    if (view.tag == 22) {//支付宝
        NSLog(@"支付宝");
        //        [self alipay];
    } else if (view.tag == 33) {//银行卡
        NSLog(@"银行卡");
        
        //        NSURLRequest * urlRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:kURL_TN_Normal]];
        //        NSURLConnection* urlConn = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self];
        //        [urlConn start];
    } else if (view.tag == 44) {//微信
        NSLog(@"微信");
        //        [WXApiRequestHandler jumpToBizPay];
    }
    
    [_fzhPopView dismissThePopView];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 44)];
    label.text = @"开通会员";
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = [UIColor whiteColor];
    self.navigationItem.titleView = label;
    
    self.oneBtn.layer.masksToBounds = YES;
    self.oneBtn.layer.cornerRadius = 5;
    self.twoBtn.layer.masksToBounds = YES;
    self.twoBtn.layer.cornerRadius = 5;
    self.threeBtn.layer.masksToBounds = YES;
    self.threeBtn.layer.cornerRadius = 5;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
